# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header

inherit mono eutils

DESCRIPTION="a frontend for subversion."
SRC_URI="mirror://sourceforge/${PN}/${P}.src.tgz"
HOMEPAGE="http://gsvn.sourceforge.net/"
IUSE="doc"
S="${WORKDIR}/gnomesvn"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~amd64"

DEPEND="${RDEPEND}
	>=dev-util/monodevelop-0.11"
	
RDEPEND=">=dev-libs/glib-2.0
		dev-util/pkgconfig"

DOCS="AUTHORS COPYING MAINTAINERS ChangeLog TODO"

src_unpack() {
	unpack ${A}
	#fixing path GNU.gettext.dll
	sed -ie 's:usr\/local\/lib:..\/usr\/lib:' ${S}/gsvn.mdp  
}
src_compile() {
	emake || die "make failed."
}

src_install() {
	make DESTDIR=${D} install || die "install failed."
	dodoc ${DOCS}            
	
	PDIR=${D}usr/lib/${PN}

	make_desktop_entry gsvn "Subversion Client" "" "Development"

	cd ${PDIR}
	for doc in ${DOCS} ; do
		rm ${doc}
	done
	rm INSTALL
	mv doc ${D}usr/share/doc/${P}
	
}

